<script type="text/javascript">
$(document).ready(function(){
	
	
	
	
	new nicEditor({iconsPath : 'http://localhost:8080/adminpanel/img/nicEditorIcons.gif'}).panelInstance('productdesc1');
	

  	
	var oShi = $("#productcat1");

		    oShi.empty();
			$.getJSON("http://localhost:8080/adminpanel/myinfo/getpt", function(data) {
					
					 
  			    	
  			    	for (i = 0; i < data.mypts.length; i++) {
    
      					$("<option value='" + data.mypts[i].type + "'>" + data.mypts[i].type + "</option>").appendTo(oShi)
      					
      				}
					
					
					
					
			});


	});
	
</script>

<!-- Page content -->
	<div id="page">
		<!-- Wrapper -->
		<div class="wrapper">
				<!-- Left column/section -->
				<section class="column width6 first">					

					<h3>ProductInfo</h3>
					
					<form id="productform" method="post" action="/adminpanel/myinfo/updateproduct?id=${productinfo.id}">

						<fieldset>
							<legend>Product info</legend>

							<p>
								<label class="required" for="productid">ID</label><br/>
								<input type="text" id="productid" readonly="true" class="" value="${productinfo.product_id}" name="productid"/>
								<small>e.g. T001</small>
							</p>
							
							
							<p>
								<label class="required" for="producttitle">Product Name</label><br/>
								<input type="text" id="producttitle" readonly="true" class="half title" value="${productinfo.product_name}" name="productname"/>
								<small>e.g. T-Shirt</small>
							</p>

							<p>
								
								<label for="productdesc">Describe your product</label><br/>
								<textarea id="productdesc1"  name="productdesc1"  style="width: 600px; height:300px;" >${productinfo.product_describe}</textarea>
								
							</p>
							
							<div class="clearfix leading">
								<div class="column width3 first">
									<p>
										<label for="productcat">Product type</label><br/>
										<select id="productcat1" class="full" name="productcat1">
											<option value="${productinfo.product_type}" selected>${productinfo.product_type}</option>
										</select>
										
									</p>
									
									
									
								</div>
								
								<div class="column width3">
									<p>
										<label for="productvendor">Product vendor</label><br/>
										<select id="productvendor" class="full" name="productvendor">
											<option value="Adidas" selected>Adidas</option>
											<option value="Puma">Puma</option>
										</select>
										
									</p>
									
								</div>
							</div>
						
							<p class="box"><input type="submit" name="cc" id="cc" class="btn btn-green big" value="Update"/></p>
<!--							<p class="box"><a href="#" id="sp" class="btn btn-special"><img SRC="/adminpanel/img/page_save.png" class="icon" alt=""/>Save Publish</a></p>-->

						</fieldset>

					</form>

				</section>
				<!-- End of Left column/section -->
				
				<!-- Right column/section -->
				<aside class="column width2">
					<p><a href="#" class="btn btn-special btn-green"><img SRC="/adminpanel/img/page_white_go.png" class="icon" alt=""/>Preview Product</a></p>
					<p><a href="#" id="sd" class="btn btn-special"><img SRC="/adminpanel/img/page_save.png" class="icon" alt=""/>Save Draft</a></p>
					
					<div class="content-box">
						<header>
							<h3>Product Tags</h3>
						</header>
						<section>
							Enter any number of tags separated by space.
							<p><textarea id="tags" class="small full" name="tags"></textarea></p>
						</section>
					</div>
					
				</aside>
				<!-- End of Right column/section -->
				
		</div>
		<!-- End of Wrapper -->
	</div>
	<!-- End of Page content -->